package com.bdqn.controller;

import com.bdqn.pojo.HisCareOrderItem;
import com.bdqn.service.HisCareOrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/hco")
public class HisCareOrderItemController {
    @Autowired
    HisCareOrderItemService hisCareOrderItemService;
    @GetMapping ("/gethco")
    List<HisCareOrderItem> selectAll(String itemName,String createTime){
        List<HisCareOrderItem> list=hisCareOrderItemService.selectAll(itemName,createTime);
        return list;
    }
    @GetMapping("/gethcogroup")
    List<HisCareOrderItem> selectAllGroup(String itemName){
        List<HisCareOrderItem> list=hisCareOrderItemService.selectAllGroup(itemName);
        return list;
    }
}
